package com.game.server.message.proto.in;

import java.nio.ByteBuffer;
import java.nio.charset.CharacterCodingException;

import lombok.Getter;

import com.comm.ISession;

import com.game.server.message.AbstractMessage;
import com.game.server.message.IRequset;

public abstract class AbstractZuPaiReq extends AbstractMessage implements IRequset{
	static final public int msgcode = 153;
	
	@Getter protected Integer[] cards;
	
	@Override
	public void DeSerialize(ByteBuffer buffer) throws CharacterCodingException {
		cards = ReadArray1(buffer);
		
	}
	
	protected Integer[] ReadArray1(ByteBuffer buf){	int len = buf.getShort();	Integer[] array =  new Integer[len];	for(int i = 0; i< len; i++)	{		array[i] = ReadInteger(buf);	} return array;}
	@Override
	public abstract void Execute(ISession session);
}

